package org.lztvn.elearning.service;

import java.util.List;

import org.lztvn.elearning.dao.ICommandDao;
import org.lztvn.elearning.entities.Command;
import org.springframework.transaction.annotation.Transactional;
@Transactional
public class CommandeServiceImpl implements ICommandeService{
    private ICommandDao dao;
	@Override
	public Long addCommande(Command c) {
		return dao.addCommand(c);
	}

	@Override
	public void editCommande(Command c) {
		dao.modifierCommand(c);
		
	}

	@Override
	public void delCommande(Long idc) {
		dao.deleteCommand(idc);
		
	}

	@Override
	public Command getCommande(Long Idc) {
		return dao.getCommand(Idc);
	}

	public ICommandDao getDao() {
		return dao;
	}

	public void setDao(ICommandDao dao) {
		this.dao = dao;
	}

	@Override
	public List<Command> listCommandByUserId(Long idUser, int position,
			int nb_com) {
		return dao.listCommandByUserId(idUser, position, nb_com);
	}

	@Override
	public List<Command> listCommand(int position, int nb_com) {
		return dao.listCommand(position, nb_com);
	}
	
	

}
